package com.hmall.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hmall.order.pojo.Order;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

public interface OrderMapper extends BaseMapper<Order> {

    /**
     * 根据状态和下单时间查询订单
     * @param status
     * @param orderTime
     */
    @Select("select * from tb_order where status = #{status} and create_time < #{orderTime}")
    List<Order> getByStatusAndOrderTime(Integer status, Date orderTime);
}
